const router = require('koa-router')()
const user_controllers = require('../../controllers/user_controllers')
const jwt_auth = require('../../middleware/jwt_auth')

router
  .post('/user/login', user_controllers.login)
  .post('/user/login_admin', user_controllers.login_admin)
  .post('/user', user_controllers.register)
  .get('/user/:id', jwt_auth, user_controllers.get_user)
  .post('/user/token', jwt_auth, user_controllers.auth_token)
  .get('/userData/:id', user_controllers.get_user_data)
  // 用户中心
  .post('/user/credential', user_controllers.credential)
  // .get('/user/getCredent',user_controllers.get_user_credential)
  .post('/user/getLogin', user_controllers.yz_login)
  .post('/user/upDPassword', user_controllers.updated_password)
  
  .post('/user/delect',user_controllers.delete_user_id)
module.exports = router